<?php
/**专题展示模块
 * @copyright (C)2014 Cenwor Inc.
 * @author fengwei
 * @package php
 * @name countdown.mod.php
 * @date 2014-06-03 14:11:41
 */


class ModuleObject extends MasterObject
{
	function ModuleObject( $config )
	{
		$this->MasterObject($config);
		$runCode = Load::moduleCode($this);
		$this->$runCode();
	}
	function Main()
	{	
		$clientUser = get('u', 'int');
		if ( $clientUser != '' )
		{
			handler('cookie')->setVar('finderid', $clientUser);
			handler('cookie')->setVar('findtime', time());
		}
		
		$cat_id = get('cid', 'int');
		$tid = get('tid', 'int');
		$topic_info = logic('topic')->display($tid);
		
		$data = logic('product')->product_display($cat_id);
		
		/* if (!$data && get('page', 'int') == 0)
		 {
		header('Location: '.rewrite('?mod=subscribe&code=mail'));
		exit;
		} */
		$product = $data['product'];
		//$this->Title = $data['mutiView'] ? '' : $product['name'];
		$this->Title =  '';
		//$data['mutiView'] || mocod('product.view');
		//$data['mutiView'] || productCurrentView($product);
		//$favorited = logic('favorite')->get_one($product['id']);
		include handler('template')->file('topic_detail');
	}
	function ExpressConfirm()
	{
		$oid = $this->Get['id'];
		$result = $this->OrderLogic->orderExpressConfirm($oid);
		if ( $result )
		{
			$this->Messager(__('已经确认收货，本次交易完成！'), '?mod=me&code=order');
		}
		else
		{
			$this->Messager(__('无效的订单号！'), '?mod=me&code=order');
		}
	}
}
?>